package com.maoye.ossp.common.web.taglib;


import javax.servlet.jsp.tagext.TagSupport;

/**自定义标签基础属性java类
 * @author: yanghao
 * 
 * 
 */
public class BaseTag extends TagSupport {
	
    private static final long serialVersionUID = -1401431096999186953L;

    private String name;
    private String type;
    private String id;
    private String onclick;
    private String onfocus;
    private String onblur;
    private String onchange;
    private String style;
    private String class_;
    private String size;
    private String dictType;
    private String disabled;
    private String htmlEleProperties;

	public String getHtmlEleProperties() {
		return htmlEleProperties;
	}

	public void setHtmlEleProperties(String htmlEleProperties) {
		this.htmlEleProperties = htmlEleProperties;
	}

	public String getDisabled() {
		return disabled;
	}

	public void setDisabled(String disabled) {
		this.disabled = disabled;
	}

	public void generateAttribute(StringBuilder sb) {
        if (id != null) {
            sb.append(" id=\"").append(id).append("\"");
        }
        if (onclick != null) {
            sb.append(" onclick=\"").append(onclick).append("\"");
        }
        if (onfocus != null) {
            sb.append(" onfocus=\"").append(onfocus).append("\"");
        }
        if (onblur != null) {
            sb.append(" onblur=\"").append(onblur).append("\"");
        }
        if (onchange != null) {
            sb.append(" onchange=\"").append(onchange).append("\"");
        }
        if (style != null) {
            sb.append(" style=\"").append(style).append("\"");
        }
        if (class_ != null) {
            sb.append(" class=\"").append(class_).append("\"");
        }
        if (size != null) {
            sb.append(" size=\"").append(size).append("\"");
        }
        if (dictType != null) {
            sb.append(" dictType=\"").append(dictType).append("\"");
        }
        if (type != null) {
            sb.append(" type=\"").append(type).append("\"");
        }
        if (disabled != null) {
            sb.append(" disabled=\"").append(disabled).append("\"");
        }
        
        if (htmlEleProperties != null) {
            sb.append(htmlEleProperties);
        }
     
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getOnclick() {
        return onclick;
    }

    public void setOnclick(String onclick) {
        this.onclick = onclick;
    }

    public String getOnfocus() {
        return onfocus;
    }

    public void setOnfocus(String onfocus) {
        this.onfocus = onfocus;
    }

    public String getOnblur() {
        return onblur;
    }

    public void setOnblur(String onblur) {
        this.onblur = onblur;
    }

    public String getOnchange() {
        return onchange;
    }

    public void setOnchange(String onchange) {
        this.onchange = onchange;
    }

	public String getStyle() {
		return style;
	}

	public void setStyle(String style) {
		this.style = style;
	}

	public String getClass_() {
		return class_;
	}

	public void setClass_(String class_) {
		this.class_ = class_;
	}

	public String getDictType() {
		return dictType;
	}

	public void setDictType(String dictType) {
		this.dictType = dictType;
	}

}
